Optimal. Leaf size=114 \[ \frac {\left (-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2\right ) \log \left (a+b x+c x^2\right )}{2 c^2}-\frac {e \sqrt {b^2-4 a c} (2 c d-b e) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^2}+e x \left (4 d-\frac {b e}{c}\right )+e^2 x^2 \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {800, 634, 618, 206, 628} \[ \frac {\left (-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2\right ) \log \left (a+b x+c x^2\right )}{2 c^2}-\frac {e \sqrt {b^2-4 a c} (2 c d-b e) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^2}+e x \left (4 d-\frac {b e}{c}\right )+e^2 x^2 \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 618
Rule 628
Rule 634
Rule 800
Rubi steps
\begin {align*} \int \frac {(b+2 c x) (d+e x)^2}{a+b x+c x^2} \, dx &=\int \left (e \left (4 d-\frac {b e}{c}\right )+2 e^2 x+\frac {b c d^2-4 a c d e+a b e^2+\left (2 c^2 d^2+b^2 e^2-2 c e (b d+a e)\right ) x}{c \left (a+b x+c x^2\right )}\right ) \, dx\\ &=e \left (4 d-\frac {b e}{c}\right ) x+e^2 x^2+\frac {\int \frac {b c d^2-4 a c d e+a b e^2+\left (2 c^2 d^2+b^2 e^2-2 c e (b d+a e)\right ) x}{a+b x+c x^2} \, dx}{c}\\ &=e \left (4 d-\frac {b e}{c}\right ) x+e^2 x^2+\frac {\left (\left (b^2-4 a c\right ) e (2 c d-b e)\right ) \int \frac {1}{a+b x+c x^2} \, dx}{2 c^2}+\frac {\left (2 c^2 d^2+b^2 e^2-2 c e (b d+a e)\right ) \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{2 c^2}\\ &=e \left (4 d-\frac {b e}{c}\right ) x+e^2 x^2+\frac {\left (2 c^2 d^2+b^2 e^2-2 c e (b d+a e)\right ) \log \left (a+b x+c x^2\right )}{2 c^2}-\frac {\left (\left (b^2-4 a c\right ) e (2 c d-b e)\right ) \operatorname {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{c^2}\\ &=e \left (4 d-\frac {b e}{c}\right ) x+e^2 x^2-\frac {\sqrt {b^2-4 a c} e (2 c d-b e) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^2}+\frac {\left (2 c^2 d^2+b^2 e^2-2 c e (b d+a e)\right ) \log \left (a+b x+c x^2\right )}{2 c^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 111, normalized size = 0.97 \[ \frac {\left (-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2\right ) \log (a+x (b+c x))+2 e \sqrt {4 a c-b^2} (b e-2 c d) \tan ^{-1}\left (\frac {b+2 c x}{\sqrt {4 a c-b^2}}\right )+2 c e x (-b e+4 c d+c e x)}{2 c^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.13, size = 282, normalized size = 2.47 \[ \left [\frac {2 \, c^{2} e^{2} x^{2} - {\left (2 \, c d e - b e^{2}\right )} \sqrt {b^{2} - 4 \, a c} \log \left (\frac {2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c + \sqrt {b^{2} - 4 \, a c} {\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) + 2 \, {\left (4 \, c^{2} d e - b c e^{2}\right )} x + {\left (2 \, c^{2} d^{2} - 2 \, b c d e + {\left (b^{2} - 2 \, a c\right )} e^{2}\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c^{2}}, \frac {2 \, c^{2} e^{2} x^{2} - 2 \, {\left (2 \, c d e - b e^{2}\right )} \sqrt {-b^{2} + 4 \, a c} \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) + 2 \, {\left (4 \, c^{2} d e - b c e^{2}\right )} x + {\left (2 \, c^{2} d^{2} - 2 \, b c d e + {\left (b^{2} - 2 \, a c\right )} e^{2}\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c^{2}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.18, size = 144, normalized size = 1.26 \[ \frac {{\left (2 \, c^{2} d^{2} - 2 \, b c d e + b^{2} e^{2} - 2 \, a c e^{2}\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c^{2}} + \frac {{\left (2 \, b^{2} c d e - 8 \, a c^{2} d e - b^{3} e^{2} + 4 \, a b c e^{2}\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{\sqrt {-b^{2} + 4 \, a c} c^{2}} + \frac {c^{2} x^{2} e^{2} + 4 \, c^{2} d x e - b c x e^{2}}{c^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.05, size = 264, normalized size = 2.32 \[ \frac {4 a b \,e^{2} \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}\, c}-\frac {8 a d e \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}-\frac {b^{3} e^{2} \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}\, c^{2}}+\frac {2 b^{2} d e \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}\, c}+e^{2} x^{2}-\frac {a \,e^{2} \ln \left (c \,x^{2}+b x +a \right )}{c}+\frac {b^{2} e^{2} \ln \left (c \,x^{2}+b x +a \right )}{2 c^{2}}-\frac {b d e \ln \left (c \,x^{2}+b x +a \right )}{c}-\frac {b \,e^{2} x}{c}+d^{2} \ln \left (c \,x^{2}+b x +a \right )+4 d e x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.26, size = 230, normalized size = 2.02 \[ \ln \left (b\,\sqrt {b^2-4\,a\,c}-4\,a\,c+b^2+2\,c\,x\,\sqrt {b^2-4\,a\,c}\right )\,\left (\frac {\frac {b^2\,e^2}{2}-c\,\left (a\,e^2+b\,d\,e+d\,e\,\sqrt {b^2-4\,a\,c}\right )+\frac {b\,e^2\,\sqrt {b^2-4\,a\,c}}{2}}{c^2}+d^2\right )+x\,\left (\frac {b\,e^2+4\,c\,d\,e}{c}-\frac {2\,b\,e^2}{c}\right )-\ln \left (4\,a\,c+b\,\sqrt {b^2-4\,a\,c}-b^2+2\,c\,x\,\sqrt {b^2-4\,a\,c}\right )\,\left (\frac {c\,\left (a\,e^2+b\,d\,e-d\,e\,\sqrt {b^2-4\,a\,c}\right )-\frac {b^2\,e^2}{2}+\frac {b\,e^2\,\sqrt {b^2-4\,a\,c}}{2}}{c^2}-d^2\right )+e^2\,x^2 \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 1.80, size = 335, normalized size = 2.94 \[ e^{2} x^{2} + x \left (- \frac {b e^{2}}{c} + 4 d e\right ) + \left (- \frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{2 c^{2}} - \frac {2 a c e^{2} - b^{2} e^{2} + 2 b c d e - 2 c^{2} d^{2}}{2 c^{2}}\right ) \log {\left (x + \frac {a e^{2} - c d^{2} + c \left (- \frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{2 c^{2}} - \frac {2 a c e^{2} - b^{2} e^{2} + 2 b c d e - 2 c^{2} d^{2}}{2 c^{2}}\right )}{b e^{2} - 2 c d e} \right )} + \left (\frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{2 c^{2}} - \frac {2 a c e^{2} - b^{2} e^{2} + 2 b c d e - 2 c^{2} d^{2}}{2 c^{2}}\right ) \log {\left (x + \frac {a e^{2} - c d^{2} + c \left (\frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{2 c^{2}} - \frac {2 a c e^{2} - b^{2} e^{2} + 2 b c d e - 2 c^{2} d^{2}}{2 c^{2}}\right )}{b e^{2} - 2 c d e} \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________